<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
</head>
<body>
<div>
    <p>
        <a href="#">百度</a>
    </p>
    <!--dslfjasd-->
    <a href="#">腾讯</a>
    <p>abc</p>
</div>
<script>
var div = document.querySelector("div");
console.log(div.children)   // childNodes
console.log(div.childElementCount);
console.log(div.firstElementChild);  // firstChild
console.log(div.lastElementChild);  // lastChild
console.log(div.firstElementChild.nextElementSibling);
console.log(div.lastElementChild.previousElementSibling);
console.log(div.firstElementChild.parentNode);
</script>
</body>
</html>